package cn.gson.fengboot.model.service;

import cn.gson.fengboot.model.dao.LjiancheDao;
import cn.gson.fengboot.model.mapper.LjiancheMapper;
import cn.gson.fengboot.model.pojos.Ljianche;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(rollbackFor = Exception.class)
public class LjiancheService {
    @Autowired
    LjiancheDao ljiancheDao;
    @Autowired
    LjiancheMapper ljiancheMapper;

    //新增检测
    @Transactional(transactionManager = "transactionManager")
    public  void addjianche(Ljianche ljianche){
        ljiancheDao.save(ljianche);

    }

    //查询
    public List<Ljianche> jianchecx(Integer jcbid){
        return ljiancheMapper.jianchecx(jcbid);
    }

}
